package com.efast.dmom.mgmt.service.master.impl;
import java.util.List;

import com.efast.cafe.framework.util.SpringWebUtils;
import com.efast.dmom.mgmt.dao.master.TmBasWhDao;
import com.efast.dmom.mgmt.entity.master.TmBasWh;
import com.efast.dmom.mgmt.service.master.TmBasWhService;
import com.efast.dmom.mgmt.utils.Assist;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class TmBasWhServiceImpl implements TmBasWhService{
    @Autowired
    private TmBasWhDao tmBasWhDao;
    @Override
    public long getTmBasWhRowCount(Assist assist){
        return tmBasWhDao.getTmBasWhRowCount(assist);
    }
    @Override
    public List<TmBasWh> selectTmBasWh(Assist assist){
        return tmBasWhDao.selectTmBasWh(assist);
    }
    @Override
    public TmBasWh selectTmBasWhByObj(TmBasWh obj){
        return tmBasWhDao.selectTmBasWhByObj(obj);
    }
    @Override
    public TmBasWh selectTmBasWhById(Integer id){
        return tmBasWhDao.selectTmBasWhById(id);
    }
    @Override
    public int insertTmBasWh(TmBasWh value){
        return tmBasWhDao.insertTmBasWh(value);
    }
    @Override
    public int insertNonEmptyTmBasWh(TmBasWh value){
        return tmBasWhDao.insertNonEmptyTmBasWh(value);
    }
    @Override
    public int insertTmBasWhByBatch(List<TmBasWh> value){
        return tmBasWhDao.insertTmBasWhByBatch(value);
    }
    @Override
    public int deleteTmBasWhById(Integer id){
        return tmBasWhDao.deleteTmBasWhById(id);
    }
    @Override
    public int deleteTmBasWh(Assist assist){
        return tmBasWhDao.deleteTmBasWh(assist);
    }
    @Override
    public int updateTmBasWhById(TmBasWh enti){
        return tmBasWhDao.updateTmBasWhById(enti);
    }
    @Override
    public int updateTmBasWh(TmBasWh value, Assist assist){
        return tmBasWhDao.updateTmBasWh(value,assist);
    }
    @Override
    public int updateNonEmptyTmBasWhById(TmBasWh enti){
        return tmBasWhDao.updateNonEmptyTmBasWhById(enti);
    }
    @Override
    public int updateNonEmptyTmBasWh(TmBasWh value, Assist assist){
        return tmBasWhDao.updateNonEmptyTmBasWh(value,assist);
    }

    public TmBasWhDao getTmBasWhDao() {
        return this.tmBasWhDao;
    }

    public void setTmBasWhDao(TmBasWhDao tmBasWhDao) {
        this.tmBasWhDao = tmBasWhDao;
    }
    @Override
    public List<TmBasWh> getWarehouse() {
        String companyCode = SpringWebUtils.getRequestCompany();
        List<TmBasWh> whList = this.selectTmBasWh(new Assist().setRequires(Assist.andEq("company_code", companyCode)));
        return whList;
    }
}